﻿using System;
using log4net;

namespace MyLog {
    public class LogHelper {
        public static readonly ILog Loginfo = LogManager.GetLogger("logInfo");
        public static readonly ILog Logerror = LogManager.GetLogger("logError");

        public static void WriteLog(string info) {
            if (Loginfo.IsInfoEnabled) {
                Loginfo.Info(info);
            }
        }

        public static void WriteLog(string info, Exception exception) {
            if (Logerror.IsErrorEnabled) {
                Logerror.Error(info, exception);
            }
        }
    }
}